/* import DashBoard from '../pages/DashBoard/index.js'
import ArtLists from '../pages/ArtLists/index.js'
import ArtEdit from '../pages/ArtEdit/index.js'
import ArtAdd from '../pages/ArtAdd/index.js'
import MsgLists from '../pages/MsgLists/index.js'
import Settings from '../pages/Settings/index.js'
import NoPermission from '../pages/NoPermission/index.js' */
import { lazy } from 'react'
import { UnorderedListOutlined,LineChartOutlined, MessageOutlined ,SettingOutlined } from '@ant-design/icons'
const DashBoard = lazy(()=> import("../pages/DashBoard/index.js"));
const ArtLists = lazy(()=> import("../pages/ArtLists/index.js"));
const ArtEdit = lazy(()=> import("../pages/ArtEdit/index.js"));
const ArtAdd = lazy(()=> import("../pages/ArtAdd/index.js"));
const MsgLists = lazy(()=> import("../pages/MsgLists/index.js"));
const Settings = lazy(()=> import("../pages/Settings/index.js"));
const NoPermission = lazy(()=> import("../pages/NoPermission/index.js"));

const adminRoutes = [
   {
     path: '/admin/dashBoard',
     component: DashBoard,
     name:"仪表盘",
     meta: {
       isNav: true,
       roles:['admin','superAdmin','editor']
     },
     icon: LineChartOutlined
   },
   {
     path: '/admin/artLists',
     component: ArtLists,
     name:"文章管理",
     meta: {
       isNav: true,
       roles:['admin','superAdmin','editor']
     },
     icon: UnorderedListOutlined
   },
   {
     path: '/admin/artEdit/:artId',
     name: "编辑文章",
     component: ArtEdit,
     meta: {
       isNav: false,
       roles:['admin','superAdmin','editor']
     }
   },
   {
     path: '/admin/artAdd',
     name:'增加文章',
     component: ArtAdd,
     meta: {
       isNav: false,
       roles:['admin','superAdmin','editor']
     }
   },
   {
     path: '/admin/msgLists',
     name:"消息中心",
     component: MsgLists,
     meta: {
       isNav: true,
       roles:['admin','superAdmin','editor']
     },
     icon: MessageOutlined
   },
   {
     path: '/admin/settings',
     component: Settings,
     name:"设置",
     meta: {
       isNav: true,
       roles:['superAdmin','editor']
     },
     icon: SettingOutlined
   },
   {
     path: '/admin/noPermission',
     component: NoPermission,
     name:"没有权限",
     meta: {
       isNav: false,
       roles:"*"
     }
   }
]

export default adminRoutes